package com.baifendian.service.impl;

import com.baifendian.dao.entity.RcApiInterStat;
import com.baifendian.dao.entity.RcOverviewStat;
import com.baifendian.dao.mapper.ExcApiTrackMapper;
import com.baifendian.dao.mapper.RcOverviewStatMapper;
import com.baifendian.service.ExcApiTrackService;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author peng.guo on 2018/3/6.
 */
@Service
public class ExcApiTrackServiceImpl implements ExcApiTrackService {


  @Resource
  private ExcApiTrackMapper excApiTrackMapper;

  @Resource
  private RcOverviewStatMapper rcOverviewStatMapper;

  @Override
  public int getTotalApi() {
    int totalMap = excApiTrackMapper.getTotalApi();
    return totalMap;
  }

  @Override
  public int getTotalApiByDay(Date date) {
    int totalApiByDay = excApiTrackMapper.getTotalApiByDay(date);
    return totalApiByDay;
  }

  @Override
  public int getTotalAudit() {
    return excApiTrackMapper.getTotalAudit();
  }

  @Override
  public int getTotalAuditByDay(Date date) {
    int totalAuditByDay = excApiTrackMapper.getTotalAuditByDay(date);
    return totalAuditByDay;
  }

  @Override
  public int getInstitution() {
    return excApiTrackMapper.getInstitution();
  }

  @Override
  public int getSystem() {
    return excApiTrackMapper.getSystem();
  }

  @Override
  public int getDbNumber() {
    return excApiTrackMapper.getDbNumber();
  }

  @Override
  public int getFtpNumber() {
    return excApiTrackMapper.getFtpNumber();
  }

  @Override
  public void saveRcOverviewStat(RcOverviewStat rcOverviewStat) {
    rcOverviewStatMapper.insertSelective(rcOverviewStat);
  }

  @Override
  public void delRcOverviewStat() {
    rcOverviewStatMapper.delRcOverviewStat();
  }


}
